package com.itheima.Work01;

public class Student01 {
    private String name;
    private int age;

    public Student01() {
    }
    public Student01(String name, int age) {
        this.name = name;
        this.age = age;
    }
    // 自行补充getters and setters

    // 显示信息的方法
    public void showInfo() {
        System.out.println(name + " - " + age);
    }

    @Override
    public String toString() {
        return "Student01{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
